﻿using Joy.Erp.BasicArchives.Core;
using Joy.Erp.BasicArchives.Core.UniqueCodes;
using Joy.Erp.BasicArchives.ItemMasters;
using System;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;

namespace Joy.Erp.BasicArchives.Production
{
    /// <summary>
    /// 计划订单
    /// </summary>
    public class PlanOrder : DocumentAggregateRoot<PlanOrderPreparation>, IMultiTenant, IUniqueCode, IHasConcurrencyStamp
    {
        /// <summary>
        /// 所属租户
        /// </summary>
        public Guid? TenantId { get; set; }

        /// <summary>
        /// 单据类型
        /// </summary>
        public Guid OrderTypeId { get; set; }

        /// <summary>
        /// 单据类型
        /// </summary>
        public PlanOrderType OrderType { get; set; }

        /// <summary>
        /// 供应类型
        /// </summary>
        public SupplyType SupplyType { get; set; }

        /// <summary>
        /// 料品
        /// </summary>
        public Guid ItemMasterId { get; set; }

        /// <summary>
        /// 料品
        /// </summary>
        public ItemMaster ItemMaster { get; set; }

        /// <summary>
        /// 料品编号
        /// </summary>
        public string ItemCode { get; set; }

        /// <summary>
        /// 料品名称
        /// </summary>
        public string ItemName { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string ItemSpec { get; set; }

        /// <summary>
        /// 计划数量
        /// </summary>
        public decimal Quantity { get; set; }

        /// <summary>
        /// 释放数量
        /// </summary>
        public decimal ReleaseQuantity { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Mark { get; set; }
    }
}
